{extend name="../template/admin/base.html" /}
{block name="index_right"}
<ul class="nav nav-tabs" role="tablist">
    <li class="active"><a href="{:url('admin/slide/index')}">轮播图列表</a></li>
    <li><a href="{:url('admin/slide/post')}">轮播图添加</a></li>
</ul>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">栏目管理</h3>
    </div>
    <div class="panel-body">
        <table class="table table-hover">
            <thead>

            <tr>
                <th>轮播图编号</th>
                <th>轮播图标题</th>
                <th>轮播图缩略</th>
                <th>轮播图跳转地址</th>
                <th>操作</th>
            </tr>
            {volist name="model" id="vo"}
            <tr>
                <th>{$vo['sid']}</th>
                <th>{$vo['slide_title']}</th>
                <th>{$vo['slide_img']}</th>
                <th>{$vo['slide_url']}</th>
                <td>
                    <div class="btn-group btn-group-sm">
                        <a href="{:url('admin/slide/post',['sid'=>$vo['sid']])}" class="btn btn-success">编辑</a>
                        <a href="javascript:;" onclick="del({$vo['sid']})" class="btn btn-danger">删除</a>
                    </div>
                </td>
            </tr>
            {/volist}
            </thead>
        </table>

    </div>
</div>

<script>
    function del(cate_id) {

        require(['util'], function (util) {
            util.confirm('确定删除吗?', function () {
                location.href = "{:url('del')}?cid=" + cate_id;
            })
        })

    }
</script>
{/block}